Skip to content

fast-get: fix a recent regression#10639

Open
lyakh wants to merge 1 commit intothesofproject:mainfrom
lyakh:fastget
Open

fast-get: fix a recent regression#10639
lyakh wants to merge 1 commit intothesofproject:mainfrom
lyakh:fastget

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Mar 20, 2026

Recent commits 7d0621e ("fast-get: fix partition leak for multi-thread usage") and 3c757dd ("fast-get: fix crash by freeing buffer before removing partition") introduced a regression when using SRC in DP mode in userspace on PTL and running two aplay -r 44100
back to back. The reason is that SRC isn't calling mod_fast_put() explicitly and is instead relying on automatic clean up, which then happens in a different thread.

In fact those two commits weren't needed AFAICS, since fast_put() shouldn't be called directly from userspace, instead only mod_fast_put() should be called, which is a syscall, and therefore fast_put() then will have access to all the memory.

Copilot AI review requested due to automatic review settings March 20, 2026 15:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a userspace regression in Zephyr’s fast-get cleanup path where memory-domain partition removal can occur from a different thread than the one that originally fast-get’d the buffer (observed with SRC in DP mode and back-to-back aplay -r 44100).

Changes:

  • Change fast_put() userspace partition removal to use the entry->thread memory domain instead of k_current_get().
  • Update debug logging to reference entry->thread instead of the current thread.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ,can you respond to copilot. Thanks !

Recent commits 7d0621e ("fast-get: fix partition leak for
multi-thread usage") and 3c757dd ("fast-get: fix crash by
freeing buffer before removing partition") introduced a regression
when using SRC in DP mode in userspace on PTL and running two
aplay -r 44100
back to back. The reason is that SRC isn't calling mod_fast_put()
explicitly and is instead relying on automatic clean up, which then
happens in a different thread.

In fact those two commits weren't needed AFAICS, since fast_put()
shouldn't be called directly from userspace, instead only
mod_fast_put() should be called, which is a syscall, and therefore
fast_put() then will have access to all the memory.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh lyakh added the DNM Do Not Merge tag label Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DNM Do Not Merge tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants